
//
//  YIem_SYDockView.m
//  B段_开眼
//
//  Created by YIem on 16/5/4.
//  Copyright © 2016年 Howie. All rights reserved.
//

#import "YIem_SYDockView.h"
#import "YIem_SYTabBarView.h"
#import "YIem_SYToolBarView.h"
#import "YIem_SYProfileView.h"
#import "YIem_UIView+SYCategory.h"
@interface YIem_SYDockView ()

@property (nonatomic, strong) YIem_SYProfileView *profileView;
@property (nonatomic, strong) YIem_SYTabBarView *tabBarView;
@property (nonatomic, strong) YIem_SYToolBarView *toolBarView;

@end

@implementation YIem_SYDockView

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor colorWithRed:55/255.0 green:55/255.0 blue:55/255.0 alpha:1];
        YIem_SYProfileView *profileView = [[YIem_SYProfileView alloc] init];
        [self addSubview:profileView];
        self.profileView = profileView;
        
        YIem_SYTabBarView *tabBarView = [[YIem_SYTabBarView alloc] init];
        [self addSubview:tabBarView];
        self.tabBarView = tabBarView;
        
        YIem_SYToolBarView *toolBarView = [[YIem_SYToolBarView alloc] init];
        [self addSubview:toolBarView];
        self.toolBarView = toolBarView;
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    // 头像
//    self.profileView.width = self.width *0.8;
//    self.profileView.height = self.profileView.width;
//    self.profileView.x = (self.width - self.profileView.width) *0.5;
//    self.profileView.y = 70;
//    
    // 标签
    self.tabBarView.width = self.width;
    self.tabBarView.height = 70 * 6;
    self.tabBarView.y = self.toolBarView.y - self.tabBarView.height - 40;
    // 工具
    self.toolBarView.width = self.width;
    self.toolBarView.height = self.width *3;
    
    self.toolBarView.y = self.height - self.toolBarView.height;


    
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
